package com.xiaobai.demo.service.impl;

import com.xiaobai.demo.mapper.DiagnosticMapper;
import com.xiaobai.demo.pojo.Diagnostic;
import com.xiaobai.demo.service.DiagnosticService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DiagnosticServiceImpl implements DiagnosticService {

    @Autowired
    private DiagnosticMapper diagnosticMapper;

    @Override
    public List<Diagnostic> findAll() {
        return diagnosticMapper.findAll();
    }

    @Override
    public Diagnostic findById(Integer id) {
        return diagnosticMapper.findById(id);
    }

    @Override
    public List<Diagnostic> findByUserId(Integer userId) {
        return diagnosticMapper.findByUserId(userId);
    }

    @Override
    public int save(Diagnostic diagnostic) {
        return diagnosticMapper.save(diagnostic);
    }

    @Override
    public int update(Diagnostic diagnostic) {
        return diagnosticMapper.update(diagnostic);
    }

    @Override
    public int delete(Integer id) {
        return diagnosticMapper.delete(id);
    }
}